#define GPIOA *((volatile unsigned int*)0x10000000)
#define GPIOB *((volatile unsigned int*)0x00001004)
#define UART_DR *((volatile unsigned char*)0x00001000)

#define GPIO0 *((volatile unsigned int*)0x00001008)
#define GPIO1 *((volatile unsigned int*)0x0000100C)
#define GPIO2 *((volatile unsigned int*)0x00001010)
void puts(char*str)
{
    for(;*str != 0;str++)
    {
        UART_DR = *str;
    }
}
const char hextable[]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
void printInt(char*str1,unsigned int data)
{
    char str2[9] = {0};
    unsigned char ch,i;
    puts(str1);
    for(i=0;i<8;i++)
    {
        ch = (unsigned char )data;
        ch = ch &0xf;
        data>>=4;
        str2[7 - i] = hextable[ch];
    }
    str2[8]=0;
    puts(str2);
    puts("\n");
}
int main(void)
{
    unsigned int i,j=1;
    GPIOA=0xff;
    for(i = 0;i < 0xffffffff;i++)
    for(j=0;j<i;j++)
    {
        GPIO0 = i;
        GPIO1 = j;
        GPIO2 = i - j;
    }
    puts("hello world\r\n");
    while(1)
    {
        for(i=0;i<10;i++)
        {
            GPIOA^=0xff;
            
        }
        GPIOB = (unsigned char)i;
    }
    return 0;
}